import React, { Component, Fragment } from 'react';
import {Table,Select,Button, Row, Col,Tooltip,Popconfirm,Icon,DatePicker,Radio} from 'antd';
import { connect } from 'dva';

import SearchC from '../../components/searchC'
import styles from './OrderList.less';
const Option = Select.Option;
const { RangePicker } = DatePicker;
import classNames from 'classnames';
import { routerRedux } from 'dva/router';
import CommonOrder from "../../components/Order/CommonOrder"

class OrderList extends Component{
    constructor(props){
        super(props)
        this.state={
            columns:[],
        }
     
    }
    addModel(){
        const { dispatch } = this.props;

        console.log("add")
        dispatch(routerRedux.push("/api/ProductList/ListStep"));

    }
    onChange(value, dateString) {
        console.log('Selected Time: ', value);
        console.log('Formatted Selected Time: ', dateString);
      }
      
    onOk(value) {
        console.log('onOk: ', value);
      }
    componentDidMount(){

    }
    componentWillMount(){
        

    }
    render(){
        const {columns} = this.state;
        return (
        <div className={styles.list}>
            <Row gutter={16} className={styles.setting}>
                <Col className={classNames(styles.flelgtartwarp, "gutter-row")} md={3} lg={4} xl={5} xxl={6} >
                    <SearchC/>

                </Col>
                <Col  className={classNames(styles.flexstartwarp, "gutter-row")} md={14} lg={13} xl={12} xxl={10}>
                    <div>
                        <span>下单时间：</span>                    
                        <RangePicker
                        showTime={{ format: 'HH:mm' }}
                        format="YYYY-MM-DD HH:mm"
                        placeholder={['Start Time', 'End Time']}
                        onChange={this.onChange}
                        onOk={this.onOk}
                        />

                    </div>
                    <Select
                        showSearch
                        style={{ width: 95 }}
                        placeholder="修改分类"
                        optionFilterProp="children"
                        defaultValue={"近7天"}
                    >
                        <Option value="近7天">近7天</Option>
                        <Option value="15">近半个月</Option>
                        <Option value="30">近30天</Option>
                    </Select>
                </Col>
                <Col  className={classNames(styles.flexbetweenwarp,styles.buts)} lg={7} xl={7}  xxl={8}>
                    {/* <Button type="primary" size="lgall" >全部</Button>
                    <Button   size="lgall" >代付款</Button>
                    <Button   size="lgall" >已付款</Button>
                    <Button   size="lgall" >待收货</Button>
                    <Button   size="lgall" >已完成</Button>
                    <Button   size="lgall" >已关闭</Button> */}
                    <Radio.Group style={{width:"100%"}}>
                        <Radio.Button value="a" >全部</Radio.Button>
                        <Radio.Button value="b">代付款</Radio.Button>
                        <Radio.Button value="c">已付款</Radio.Button>
                        <Radio.Button value="d">待收货</Radio.Button>
                        <Radio.Button value="e">已完成</Radio.Button>
                        <Radio.Button value="f">已关闭</Radio.Button>
                    </Radio.Group>
                </Col>
            </Row>
            <div>
                    <CommonOrder/>

            </div>
        </div>)
    }
}

export default OrderList;
